﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    abstract class Robot
    {
        public string name { get; set; }

        public abstract void Working();
        public static Robot b(string c)
        {
            Robot r;
            switch (c)
            {
                case "炒菜":
                    r = new CookRobot(a.大白菜);
                    break;
                case "传菜":
                    r = new DeliveryRobot(4);
                    break;
                default:
                    r = new CookRobot(a.胡萝卜);
                    break;
            }
            return r;
        }
    }
}
